package com.czc.cca.ddl;

import org.zoomdev.zoom.dao.ddl.*;
import org.zoomdev.zoom.dao.driver.mysql.MysqlDriver;

@_DDL_CompoundUniqueGroup({
        @_DDL_CompoundUnique(name = "UNI_usr_id_ch_type", columns = {"usr_id", "ch_type"})
})
@_DDL_Table(name = "a_qb", simpleName = "", engine = MysqlDriver.InnoDB, comment = "交易通道")
public class _DDL_AQb {

    @_DDL_Primary()
    @_DDL_Column(name = "id", type = SqlType.INT_UNSIGNED, nullable = false, autoIncrement = true, comment = "id")
    private Long id;

    @_DDL_Column(name = "usr_id", type = SqlType.INT_UNSIGNED, comment = "用户id")
    private Long usrId;

    @_DDL_Column(name = "ch_type", type = SqlType.TINYINT_UNSIGNED, comment = "渠道类型")
    private Integer chType;

    @_DDL_Column(name = "ch_id", type = SqlType.VARCHAR, size = 30, nullable = false, comment = "第三方账号")
    private String chId;

    @_DDL_Column(name = "cr_time", type = SqlType.TIMESTAMP, defaultFunction = MysqlDriver.CURRENT_TIMESTAMP, comment = "第三方创建时间")
    private java.sql.Timestamp crTime;

    @_DDL_Column(name = "balance", type = SqlType.DECIMAL, size = 8, scale = 2, comment = "可用余额（元）")
    private java.math.BigDecimal balance;

    @_DDL_Column(name = "frozen", type = SqlType.DECIMAL, size = 8, scale = 2, comment = "冻结余额（元）")
    private java.math.BigDecimal frozen;

    @_DDL_Column(name = "counter", type = SqlType.INT_UNSIGNED, comment = "计数器")
    private Long counter;

    @_DDL_Column(name = "state", type = SqlType.TINYINT_UNSIGNED, comment = "状态 0 正常 1 锁定 2 销毁")
    private Integer state;

}
